﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page session="false" %>
<%@ page isELIgnored ="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="kafn" uri="http://app.kanasinfo.com/jsp/taglib/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>kanas application</title>
	<link rel="shortcut icon" href="${pageContext.request.contextPath}/assets/images/favicon.ico" />
	<style type="text/css">
		@import "${pageContext.request.contextPath}/assets/dojo/dijit/themes/soria/soria.css";
		@import "${pageContext.request.contextPath}/assets/dojo/dojo/resources/dojo.css";
		@import "${pageContext.request.contextPath}/assets/dojo/dojox/layout/resources/ExpandoPane.css";
		@import "${pageContext.request.contextPath}/assets/style/global.css";
		@import "${pageContext.request.contextPath}/assets/style/module.css";
		@import "${pageContext.request.contextPath}/assets/style/kijit.css";
		@import "${pageContext.request.contextPath}/assets/kanas/resources/commonIcons16.css";
	</style>
	<script src="${pageContext.request.contextPath}/assets/appscript/dojoconfigbaseurl.js" type="text/javascript"></script>
	<script src="${pageContext.request.contextPath}/assets/appscript/dojoconfig.js" type="text/javascript"></script>
	<script src="${pageContext.request.contextPath}/assets/dojo/dojo/dojo.js" data-dojo-config="parseOnLoad: true,async:true,locale:'zh',isDebug: false"></script>
	<script src="${pageContext.request.contextPath}/assets/kanas/kanas-base.js" type="text/javascript"></script>
</head>
<body class="soria loading kpp" style="background-color:#E1EBFB;">
	<script>
	//<![CDATA[
	    var appCenterResource;
		require(["dojo/ready","dojo/i18n!appscript/locale/nls/_Application","dojo/i18n!appscript/locale/nls/AppCenter","appscript/Module",
				"dojo/_base/kernel","dojo/_base/loader","dojo/parser",
				"dijit/layout/BorderContainer","dijit/layout/ContentPane","dijit/layout/TabContainer","dijit/Dialog","dijit/form/Form","dijit/Toolbar",
				"dijit/form/Button","dijit/form/RadioButton","dijit/form/CheckBox","dijit/form/ValidationTextBox","dijit/ToolbarSeparator",
				"dojox/data/QueryReadStore","dojox/grid/DataGrid","dojox/layout/ContentPane","dijit/layout/AccordionContainer","kanas/widget/layout/ExpandoPaneX",
				"dijit/tree/ObjectStoreModel","dojo/store/Memory","dojo/data/ItemFileReadStore","dojo/data/ItemFileWriteStore","dijit/tree/ForestStoreModel","dijit/tree/TreeStoreModel","dijit/Tree"],
			function(ready,i18nApplication,i18nAppCenter,module){
				ready(function(){
					module.nodeLoaded(document.body);
					$ka.init("${pageContext.request.contextPath}","../kanas/module/{moduleId}");
					appCenterResource = i18nAppCenter;
					document.title = i18nApplication.htmlTitle;
					var wijit = dojo.byId("changePsd");
					if(wijit)dojo.attr("changePsd","title",i18nApplication.controlPane);
					
					//<c:set var="para" value="${kafn:property(pageContext.servletContext,'app.portal.home')}"/>
					//<c:if test="${!empty para}">
					$ka.openModule("${para}",null,{target:"moduleContainer",closable:false,i18nResource:appCenterResource});
					//</c:if>
					//<c:set var="para" value="${kafn:property(pageContext.servletContext,'app.portal.left')}"/>
					//<c:if test="${!empty para}">
					$ku.loadDojoExt({target:'root_container',href:'${para}',region:'left',style:'${kafn:property(pageContext.servletContext,"app.portal.left.style")}',
						showOn:'${kafn:property(pageContext.servletContext,"app.portal.left.showOn")}',splitter:true,title:i18nApplication.navigator,doLayout:true,
						container:kanas.widget.layout.ExpandoPaneX,preload:true,onLoad:function(){this.resize();}});
					//</c:if>
					//<c:set var="para" value="${kafn:property(pageContext.servletContext,'app.portal.right')}"/>
					//<c:if test="${!empty para}">
					$ku.loadDojoExt({target:'root_container',href:'${para}',region:'right',style:'${kafn:property(pageContext.servletContext,"app.portal.right.style")}',
						showOn:'${kafn:property(pageContext.servletContext,"app.portal.right.showOn")}',splitter:true,title:i18nApplication.navigator,doLayout:true,
						container:kanas.widget.layout.ExpandoPaneX,preload:true,onLoad:function(){this.resize();}});
					//</c:if>
				});
				$ka.clearBeforeIEUnload();
		});
	//]]>
	</script>
	<div id="root_container" data-temp-attr="temp" data-dojo-type="dijit/layout/BorderContainer" style="width:100%;height:100%;display:none;padding:0;" data-dojo-props="design:'titlebar',gutters:false">
		<div data-dojo-type="dijit/layout/ContentPane" id="topPanel" class="bg-x" data-dojo-props="region:'top'">
			<div id="exitButton" class="mouseHand bannerButton" onclick="window.location.href='${pageContext.request.contextPath}/j_spring_security_logout'"></div>
			<div id="changePsd" class="mouseHand bannerButton" onclick="$ka.openModule('controlpanel',null,{target:'moduleContainer',closable:true,i18nResource:appCenterResource});"></div>
		  	<div id="logo" onclick="$ka.openModule('appcenter',null,{target:'moduleContainer',closable:false})" style="float:left;position:relative;top:7px;left:15px;"></div>
		  	<div id="authInfo"><sec:authentication property="principal" var="authentication"/>${authentication.username}</div>
		</div>
		<div id="moduleContainer" data-dojo-type="dijit/layout/TabContainer" data-dojo-props="tabPosition:'top',region:'center'" ></div>
	</div>
</body>
</html>